﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IDE
{
    public partial class EditorForm : Form
    {
        private bool modificado = false;
        public bool _modificado
        {
            set
            {
                this.modificado = value;
            }

            get
            {
                return this.modificado;
            }
        }

        public EditorForm(Form parent)
        {
            InitializeComponent();
            this.MdiParent = parent;
        }

        public EditorForm()
        {
            InitializeComponent();
        }

        private void EditorForm_Load(object sender, EventArgs e)
        {
            editor.TextChanged += editor_TextChanged;
            editor.KeyUp += editor_KeyUp;
        }

        void editor_KeyUp(object sender, KeyEventArgs e)
        {
            editor.BackColor = Color.White;
        }

        void editor_TextChanged(object sender, EventArgs e)
        {
            editor.BackColor = Color.White;
            this._modificado = true;
        }


    }
}
